import dt from '@dt/dt'

let _this = null

function options(vm) {
  _this = vm
  return [
    {
      field: 'ruleName',
      title: '佣金规则名称',
      minWidth: 150,
    },
    {
      field: 'commissionWayStr',
      title: '结佣方式',
      minWidth: 100,
    },
    {
      field: 'productNames',
      title: '产品',
      minWidth: 150,
    },
    {
      title: '有效期',
      minWidth: 230,
      cell: {
        value: (row) => row.startDate + ' ~ ' + row.endDate,
        text: {}
      }
    },
    {
      field: 'auditTime',
      title: '审核通过日期',
      minWidth: 130,
    },
    {
      field: 'ruleStatusStr',
      title: '状态',
      minWidth: 100,
    },
    {
      field: 'handles',
      title: '操作',
      width: 90,
      cell: {
        btn: [{
          title: '查看',
          event: 'onDetail',
          // code: '0210010104',
        }]
      }
    }
  ]
}

export default {
  options
}
